package yc.gg.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yc.gg.domain.req.AnimalsReq;
import yc.gg.service.IAnimalsService;
import yc.gg.utils.Result;

/**
 * \* User: Fuyue
 * \* Date: 2025/6/4
 * \* Description:
 * \
 */
@RestController
@RequestMapping("/api/animals")
public class AnimalsController {
    @Autowired
    private IAnimalsService animalsService;

    @PostMapping("/add")
    public Result addAnimals(@RequestBody AnimalsReq animalsReq){return animalsService.addAnimals(animalsReq);}

    @GetMapping("/pageSelect")
    public Result pageSelect(int pageNum){return animalsService.pageSelect(pageNum);}

    @GetMapping("/getThis")
    public Result getThis(String id){return animalsService.getThis(id);}
}
